package com.graduate.after.bean;

public class SocketMsg {

    private Long userId;

    private String username;

    private String avatar;

    private String msg;

    private int count;

    public SocketMsg() {
    }

    public SocketMsg(Long userId, String username, String avatar, String msg, int count) {
        this.userId = userId;
        this.username = username;
        this.avatar = avatar;
        this.msg = msg;
        this.count = count;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    @Override
    public String toString() {
        return "SocketMsg{" +
                "userId=" + userId +
                ", username='" + username + '\'' +
                ", avatar='" + avatar + '\'' +
                ", msg='" + msg + '\'' +
                ", count=" + count +
                '}';
    }

    //    private int type; //聊天类型0：群聊，1：单聊.
//    private String fromUser;//发送者.
//    private String toUser;//接受者.
//    private String msg;//消息
//
//    public SocketMsg() {
//    }
//
//    public SocketMsg(int type, String fromUser, String toUser, String msg) {
//        this.type = type;
//        this.fromUser = fromUser;
//        this.toUser = toUser;
//        this.msg = msg;
//    }
//
//    public int getType() {
//        return type;
//    }
//
//    public void setType(int type) {
//        this.type = type;
//    }
//
//    public String getFromUser() {
//        return fromUser;
//    }
//
//    public void setFromUser(String fromUser) {
//        this.fromUser = fromUser;
//    }
//
//    public String getToUser() {
//        return toUser;
//    }
//
//    public void setToUser(String toUser) {
//        this.toUser = toUser;
//    }
//
//    public String getMsg() {
//        return msg;
//    }
//
//    public void setMsg(String msg) {
//        this.msg = msg;
//    }
//
//    @Override
//    public String toString() {
//        return "SocketMsg{" +
//                "type=" + type +
//                ", fromUser='" + fromUser + '\'' +
//                ", toUser='" + toUser + '\'' +
//                ", msg='" + msg + '\'' +
//                '}';
//    }
}
